package com.xqb.modules.service.impl;

import com.xqb.modules.domain.po.MktCouponScope;
import com.xqb.modules.mapper.MktCouponScopeMapper;
import com.xqb.modules.service.IMktCouponScopeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 优惠券作用范围信息Service业务层处理
 * 
 * @author xqb
 * @date 2024-10-15
 */
@Service
public class MktCouponScopeServiceImpl implements IMktCouponScopeService
{
    @Autowired
    private MktCouponScopeMapper mktCouponScopeMapper;

    /**
     * 查询优惠券作用范围信息
     * 
     * @param id 优惠券作用范围信息主键
     * @return 优惠券作用范围信息
     */
    @Override
    public MktCouponScope selectMktCouponScopeById(Long id)
    {
        return mktCouponScopeMapper.selectMktCouponScopeById(id);
    }

    /**
     * 查询优惠券作用范围信息列表
     * 
     * @param mktCouponScope 优惠券作用范围信息
     * @return 优惠券作用范围信息
     */
    @Override
    public List<MktCouponScope> selectMktCouponScopeList(MktCouponScope mktCouponScope)
    {
        return mktCouponScopeMapper.selectMktCouponScopeList(mktCouponScope);
    }

    /**
     * 新增优惠券作用范围信息
     * 
     * @param mktCouponScope 优惠券作用范围信息
     * @return 结果
     */
    @Override
    public int insertMktCouponScope(MktCouponScope mktCouponScope)
    {
        return mktCouponScopeMapper.insertMktCouponScope(mktCouponScope);
    }

    /**
     * 修改优惠券作用范围信息
     * 
     * @param mktCouponScope 优惠券作用范围信息
     * @return 结果
     */
    @Override
    public int updateMktCouponScope(MktCouponScope mktCouponScope)
    {
        return mktCouponScopeMapper.updateMktCouponScope(mktCouponScope);
    }

    /**
     * 批量删除优惠券作用范围信息
     * 
     * @param ids 需要删除的优惠券作用范围信息主键
     * @return 结果
     */
    @Override
    public int deleteMktCouponScopeByIds(Long[] ids)
    {
        return mktCouponScopeMapper.deleteMktCouponScopeByIds(ids);
    }

    /**
     * 删除优惠券作用范围信息信息
     * 
     * @param id 优惠券作用范围信息主键
     * @return 结果
     */
    @Override
    public int deleteMktCouponScopeById(Long id)
    {
        return mktCouponScopeMapper.deleteMktCouponScopeById(id);
    }
}
